package com.nasarius.bank.scorecard.dao.impl;


import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
import org.springframework.stereotype.Repository;

import com.ibatis.sqlmap.client.SqlMapClient;
import com.nasarius.bank.scorecard.dao.CommunicationFileDAO;
import com.nasarius.bank.scorecard.domain.CommunicationFile;
import com.nasarius.bank.scorecard.domain.CommunicationFileExample;
@Repository
public class CommunicationFileDAOImpl extends SqlMapClientDaoSupport implements CommunicationFileDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
	@Autowired	
    public CommunicationFileDAOImpl(/*@Qualifier("sqlMapClient")*/SqlMapClient sqlMapClient) {
        super();
        setSqlMapClient(sqlMapClient);  
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public int countcommunication_fileByExample(CommunicationFileExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("communication_file.ibatorgenerated_countByExample", example);
        return count;
    }
    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public int countcommunication_file() {
        return (Integer)  getSqlMapClientTemplate().queryForObject("communication_file.ibatorgenerated_count");
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public int deletecommunication_fileByExample(CommunicationFileExample example) {
        int rows = getSqlMapClientTemplate().delete("communication_file.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public int deletecommunication_fileByPrimaryKey(Integer communicationfileid) {
        CommunicationFile key = new CommunicationFile();
        key.setCommunicationfileid(communicationfileid);
        int rows = getSqlMapClientTemplate().delete("communication_file.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public void insertcommunication_file(CommunicationFile record) {
        getSqlMapClientTemplate().insert("communication_file.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public void insertcommunication_fileSelective(CommunicationFile record) {
        getSqlMapClientTemplate().insert("communication_file.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    @SuppressWarnings("unchecked")
    public List<CommunicationFile> selectcommunication_fileByExampleWithBLOBs(CommunicationFileExample example) {
        List<CommunicationFile> list = getSqlMapClientTemplate().queryForList("communication_file.ibatorgenerated_selectByExampleWithBLOBs", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    @SuppressWarnings("unchecked")
    public List<CommunicationFile> selectcommunication_fileByExampleWithoutBLOBs(CommunicationFileExample example) {
        List<CommunicationFile> list = getSqlMapClientTemplate().queryForList("communication_file.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public CommunicationFile selectcommunication_fileByPrimaryKey(Integer communicationfileid) {
        CommunicationFile key = new CommunicationFile();
        key.setCommunicationfileid(communicationfileid);
        CommunicationFile record = (CommunicationFile) getSqlMapClientTemplate().queryForObject("communication_file.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    public int updatecommunication_fileByExampleSelective(CommunicationFile record, CommunicationFileExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("communication_file.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:46 CET 2012
     */
    public int updatecommunication_fileByExampleWithBLOBs(CommunicationFile record, CommunicationFileExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("communication_file.ibatorgenerated_updateByExampleWithBLOBs", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:46 CET 2012
     */
    public int updatecommunication_fileByExampleWithoutBLOBs(CommunicationFile record, CommunicationFileExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("communication_file.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:46 CET 2012
     */
    public int updatecommunication_fileByPrimaryKeySelective(CommunicationFile record) {
        int rows = getSqlMapClientTemplate().update("communication_file.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:46 CET 2012
     */
    public int updatecommunication_fileByPrimaryKey(CommunicationFile record) {
        int rows = getSqlMapClientTemplate().update("communication_file.ibatorgenerated_updateByPrimaryKeyWithBLOBs", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table communication_file
     *
     * @ibatorgenerated Sat Jan 14 23:35:45 CET 2012
     */
    private static class UpdateByExampleParms extends CommunicationFileExample {
        private Object record;

        public UpdateByExampleParms(Object record, CommunicationFileExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}